//
//  PVDsListCalendarView.swift
//  GreenDeal
//
//  Created by Moennig Q on 12/12/2022.
//

import UIKit

class PVDsListCellCalendarView: View {
    var monthLabel : PaddingLabel!
    var dayLabel : ContentLabel!
    override func setUpView() {
        self.layer.cornerRadius = Constant.StandardCornerRadius
        self.clipsToBounds = true
        self.backgroundColor = UIColor(hexStr: "#005D2D1A")
        //month label
        monthLabel = PaddingLabel()//ContentLabel(R.font.lexendRegular(size: 12),hexStr: "#FFFFFF")
        monthLabel.padding = UIEdgeInsets(top: 2, left: 8, bottom: 2, right: 8)
        monthLabel.setFont(R.font.lexendRegular(size: 12))
        monthLabel.textColor = UIColor(hexStr:"#FFFFFF")
        monthLabel.backgroundColor = UIColor(hexStr: Constant.ThemeColorHexStr)
        monthLabel.textAlignment = .center
        self.addSubview(monthLabel)
        monthLabel.snp.makeConstraints { make in
            make.top.left.right.equalToSuperview()
            make.height.greaterThanOrEqualTo(0)
        }
        //date label
        dayLabel = ContentLabel(R.font.lexendRegular(size: 20))
        self.addSubview(dayLabel)
        dayLabel.snp.makeConstraints { make in
            make.top.equalTo(monthLabel.snp.bottom)
            make.centerX.equalToSuperview()
            make.width.height.greaterThanOrEqualTo(0)
            make.height.greaterThanOrEqualTo(0)
            make.bottom.equalTo(-2)
        }
    }
    func setData(_ month: String, day: String){
        self.monthLabel.text = month
        self.dayLabel.text = day
    }
}
